package com.itheima.constructor;

public class TestBiaoZhunLei {
    public static void main(String[] args) {
        //1.无参数构造方法创建对象，通过setXxx方法给成员变量进行赋值
        BiaoZhunLei stu1 = new BiaoZhunLei();
        stu1.setName("张三");
        stu1.setAge(23);
        stu1.show();

        //2.通过带参数构造方法，直接给属性进行赋值
        BiaoZhunLei stu2 = new BiaoZhunLei("李四",24);
        stu2.show();
    }
}
